package com.ruoyi.zhongchuangauto.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zhongchuangauto.mapper.OrderMailLogMapper;
import com.ruoyi.zhongchuangauto.domain.OrderMailLog;
import com.ruoyi.zhongchuangauto.service.IOrderMailLogService;

/**
 * 订单邮件发送日志Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
@DataSource(DataSourceType.ZHONGCHUANGAUTO)
public class OrderMailLogServiceImpl implements IOrderMailLogService
{
    @Autowired
    private OrderMailLogMapper orderMailLogMapper;

    /**
     * 查询订单邮件发送日志
     *
     * @param logId 订单邮件发送日志主键
     * @return 订单邮件发送日志
     */
    @Override
    public OrderMailLog selectOrderMailLogByLogId(Long logId)
    {
        return orderMailLogMapper.selectOrderMailLogByLogId(logId);
    }

    /**
     * 查询订单邮件发送日志列表
     *
     * @param orderMailLog 订单邮件发送日志
     * @return 订单邮件发送日志
     */
    @Override
    public List<OrderMailLog> selectOrderMailLogList(OrderMailLog orderMailLog)
    {
        return orderMailLogMapper.selectOrderMailLogList(orderMailLog);
    }

    /**
     * 新增订单邮件发送日志
     *
     * @param orderMailLog 订单邮件发送日志
     * @return 结果
     */
    @Override
    public int insertOrderMailLog(OrderMailLog orderMailLog)
    {
        return orderMailLogMapper.insertOrderMailLog(orderMailLog);
    }

    /**
     * 修改订单邮件发送日志
     *
     * @param orderMailLog 订单邮件发送日志
     * @return 结果
     */
    @Override
    public int updateOrderMailLog(OrderMailLog orderMailLog)
    {
        return orderMailLogMapper.updateOrderMailLog(orderMailLog);
    }

    /**
     * 批量删除订单邮件发送日志
     *
     * @param logIds 需要删除的订单邮件发送日志主键
     * @return 结果
     */
    @Override
    public int deleteOrderMailLogByLogIds(Long[] logIds)
    {
        return orderMailLogMapper.deleteOrderMailLogByLogIds(logIds);
    }

    /**
     * 删除订单邮件发送日志信息
     *
     * @param logId 订单邮件发送日志主键
     * @return 结果
     */
    @Override
    public int deleteOrderMailLogByLogId(Long logId)
    {
        return orderMailLogMapper.deleteOrderMailLogByLogId(logId);
    }
}
